home *** CD-ROM | disk | FTP | other *** search
/ Programming Microsoft Visual Basic .NET / Programming Microsoft Visual Basic .NET (Microsoft Press)(X08-78517)(2002).bin / setup / vbnet / 23 web forms and controls / firstwebforms / webform1.aspx.vb < prev    next >
Encoding:
Text File  |  2002-03-17  |  1.4 KB  |  36 lines

  1. Public Class WebForm1
  2.     Inherits System.Web.UI.Page
  3.     Protected WithEvents Label1 As System.Web.UI.WebControls.Label
  4.     Protected WithEvents txtOne As System.Web.UI.WebControls.TextBox
  5.     Protected WithEvents txtTwo As System.Web.UI.WebControls.TextBox
  6.     Protected WithEvents btnAdd As System.Web.UI.WebControls.Button
  7.     Protected WithEvents txtResult As System.Web.UI.WebControls.TextBox
  8.     Protected WithEvents Label2 As System.Web.UI.WebControls.Label
  9.  
  10. #Region " Web Form Designer Generated Code "
  11.  
  12.     'This call is required by the Web Form Designer.
  13.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  14.  
  15.     End Sub
  16.  
  17.     Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
  18.         'CODEGEN: This method call is required by the Web Form Designer
  19.         'Do not modify it using the code editor.
  20.         InitializeComponent()
  21.     End Sub
  22.  
  23. #End Region
  24.  
  25.     Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  26.         'Put user code to initialize the page here
  27.     End Sub
  28.  
  29.     ' evaluates the sum when the + button is clicked
  30.  
  31.     Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
  32.         Dim res As Double = CDbl(txtOne.Text) * CDbl(txtTwo.Text)
  33.         txtResult.Text = res.ToString
  34.     End Sub
  35. End Class
  36.